home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: MegaDisc / MegaDisc 34 (1993-06)(MegaDisc Digital Publishing)(AU)(Disk 1 of 2)[WB].zip / MegaDisc 34 (1993-06)(MegaDisc Digital Publishing)(AU)(Disk 1 of 2)[WB].adf / Programs / IntConv32 / DMakefile < prev    next >
Makefile  |  1993-06-21  |  4KB  |  151 lines

  1. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  2. # (C) 1993 Peter Thompson
  3. # DMakefile for 32 bit int to string/string to int conversion routines.
  4. # KNOWN BUGS
  5. # - Untested with anything except DICE.
  6. # - intconv32_protos.h will need to be modified for any compiler other than
  7. # DICE. See notes in that file for details.
  8. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  9.  
  10. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  11. # Definitions of "interesting" files.
  12. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  13.  
  14. #=# Utility routines. Consult the dependancies at the end of the DMakefile
  15. #=# to see which needs what.
  16.  
  17. USOURCES = \
  18. to32lib.asm
  19.  
  20. UOBJECTS = $(USOURCES:*.asm:%1.o)
  21.  
  22. UHDRS = $(USOURCES:*.asm:%1.i)
  23.  
  24. #=# Sources for conversion routines. Some of these depend on some of the
  25. #=# util group of routines; Consult the dependancies at the end of the
  26. #=# DMakefile to see which needs what.
  27.  
  28. SOURCES = \
  29. itoa32.asm \
  30. atoi32.asm \
  31. strto32.asm \
  32. tostr32.asm
  33.  
  34. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  35. # Definitions for the assembler library.
  36. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  37.  
  38. ASOURCES = $(SOURCES)
  39.  
  40. AOBJECTS = $(ASOURCES:*.asm:%1.o)
  41.  
  42. ASMLIBNAME = intconv32.lib
  43.  
  44. ASMOPTS = -hcfg_asm.i
  45.  
  46. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  47. # Definitions for the C library.
  48. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  49.  
  50. CSOURCES = $(SOURCES)
  51.  
  52. COBJECTS = $(CSOURCES:*.asm:"T:%1.cobj")
  53.  
  54. CLIBNAME = intconv32.clib
  55.  
  56. #=# You could put cfg_c.i here instead
  57.  
  58. COPTS = -hcfg_dice.i
  59.  
  60. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  61. # Convenience targets; for my system only. Left in as (bad?) examples.
  62. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  63.  
  64. default:
  65.     echo "Make up your mind! Targets include: backup, clib, asmlib."
  66.  
  67. backup:
  68.     copy (DMakefile|#?.(asm|i|c|h)) WORK:IntConv32 quick clone
  69.  
  70. clean:
  71.     delete #?.o
  72.     delete T:#?.cobj
  73.  
  74. test :    $(ASMLIBNAME) test.asm
  75.     a68k test.asm
  76.     blink test.o LIB $(ASMLIBNAME) to test
  77.     delete test.o quiet
  78.  
  79. ctestr : $(CLIBNAME) test.c intconv32_protos.h
  80.     dcc -2.0 -proto -o ctestr -mRR test.c -l$(CLIBNAME)
  81.  
  82. ctests : $(CLIBNAME) test.c intconv32_protos.h
  83.     dcc -1.3 -proto -o ctests test.c -l$(CLIBNAME)
  84.  
  85. objects: $(AOBJECTS)
  86.  
  87. cobjects: $(COBJECTS)
  88.  
  89. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  90. # Utility module generation rules.
  91. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  92.  
  93. $(UOBJECTS): $(USOURCES)
  94.     a68k %(right)
  95.  
  96. #=# All depend on intdefs.i
  97. $(UOBJECTS): intdefs.i
  98.  
  99. #=# All depend on their own header
  100. $(UOBJECTS): $(UHDRS)
  101.  
  102. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  103. # Assembler library targets.
  104. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  105.  
  106. #=# Library creation.
  107.  
  108. asmlib:    $(ASMLIBNAME)
  109.  
  110. $(ASMLIBNAME) : $(UOBJECTS) $(AOBJECTS)
  111.     join $(UOBJECTS) $(AOBJECTS) as $(ASMLIBNAME)
  112.  
  113. #=# Rule for generating assembler objects from sources
  114.  
  115. $(AOBJECTS) : $(ASOURCES)
  116.     a68k $(ASMOPTS) %(right)
  117.  
  118. $(AOBJECTS) : intdefs.i
  119.  
  120. $(AOBJECTS) : intconv32.i
  121.  
  122. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  123. # C library targets.
  124. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  125.  
  126. #=# Library creation
  127.  
  128. clib: $(CLIBNAME)
  129.  
  130. $(CLIBNAME) : $(UOBJECTS) $(COBJECTS)
  131.     join $(UOBJECTS) $(COBJECTS) as $(CLIBNAME)
  132.  
  133. #=# Rule to create C stubs.
  134.  
  135. $(COBJECTS) : $(CSOURCES)
  136.     a68k $(COPTS) -o%(left) %(right)
  137.  
  138. $(COBJECTS) : intdefs.i
  139.  
  140. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  141. # Misc. dependencies.
  142. #=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#=#
  143.  
  144. #=# Misc. dependencies.
  145.  
  146. atoi32.o : to32lib.i
  147.  
  148. strto32.o : to32lib.i
  149.  
  150. # End Of File #
  151.